#!/bin/bash

############################################################################
#
# 远程执行该脚本，请在命令行中直接执行以下命令：
#
#   curl -sSL https://gitee.com/tay3223/biubiubiu/raw/master/centos7-install-miniconda.sh | /bin/bash
#
#
############################################################################

yum -y install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver


mkdir -p /opt/miniconda3
#wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /opt/miniconda3/miniconda.sh
#wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.4.0-0-Linux-x86_64.sh -O /opt/miniconda3/miniconda.sh
wget https://file.taycc.com/d/bao/conda3/Miniconda3-py312_24.4.0-0-Linux-x86_64.sh -O /opt/miniconda3/miniconda.sh
bash /opt/miniconda3/miniconda.sh -b -u -p /opt/miniconda3
rm -rf /opt/miniconda3/miniconda.sh
/opt/miniconda3/bin/conda init bash

cat <<Tay | tee /opt/miniconda3/README.txt

====================================
1.登出命令行

2.重新登录命令行

3.常用命令：

conda env list                          # 列出所有已创建的环境

conda create --name myenv               # 创建名为myenv的新环境
conda create --name myenv python=3.9    # 创建指定Python版本的新环境

conda activate myenv                    # 激活名为myenv的环境
conda deactivate                        # 退出当前环境
====================================

Tay